using System;
using System.Runtime.Serialization;
using RentalOfCars.Domain.Entities;

namespace RentalOfCars.Infrastructure.Entities
{
    [DataContract]
    public class Employee : IEmployee
    {
        public Employee(int personId, string name, string lastName, string login, string patronymic, string passport,
                        string phone, int employeeId, string password, IEmployeeClass @class, DateTime hireDate,
                        DateTime fireDate)
        {
            PersonId = personId;
            Name = name;
            LastName = lastName;
            Login = login;
            Patronymic = patronymic;
            Passport = passport;
            Phone = phone;
            EmployeeId = employeeId;
            Password = password;
            Class = @class;
            HireDate = hireDate;
            FireDate = fireDate;
        }

        #region IEmployee Members

        [DataMember]
        public int PersonId { get; private set; }

        [DataMember]
        public string Name { get; private set; }

        [DataMember]
        public string LastName { get; private set; }

        [DataMember]
        public string Login { get; private set; }

        [DataMember]
        public string Patronymic { get; private set; }

        [DataMember]
        public string Passport { get; private set; }

        [DataMember]
        public string Phone { get; private set; }

        [DataMember]
        public int EmployeeId { get; private set; }

        [DataMember]
        public string Password { get; private set; }

        [DataMember]
        public IEmployeeClass Class { get; private set; }

        [DataMember]
        public DateTime HireDate { get; private set; }

        [DataMember]
        public DateTime FireDate { get; private set; }

        #endregion
    }
}